home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Interrupts.h
-
- Contains: Public Interface to the Interrupt Manager.
-
- Version: PowerSurge 1.0.2 and beyond (including Copland)
-
- DRI: Jonathan Sand
-
- Copyright: © 1984-1996 by Apple Computer, Inc.
- All rights reserved.
-
- Warning: *** APPLE INTERNAL USE ONLY ***
- This file may contain unreleased API's
-
- BuildInfo: Built by: SuperMario Build Daemon
- With Interfacer: 2.0d10 (PowerPC native)
- From: Interrupts.i
- Revision: 29
- Dated: 1/18/96
- Last change by: jrs
- Last comment: Compile with MrC. Use stub libraries.
-
- Bugs: Report bugs to Radar component “System Interfaces”, “Latest”
- List the version information (from above) in the Problem Description.
-
- */
- #ifndef __INTERRUPTS__
- #define __INTERRUPTS__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- /* Interrupt types */
- typedef struct OpaqueInterruptSetID* InterruptSetID;
- typedef long InterruptMemberNumber;
- struct InterruptSetMember {
- InterruptSetID setID;
- InterruptMemberNumber member;
- };
- typedef struct InterruptSetMember InterruptSetMember;
-
-
- enum {
- kISTChipInterruptSource = 0,
- kISTOutputDMAInterruptSource = 1,
- kISTInputDMAInterruptSource = 2,
- kISTPropertyMemberCount = 3
- };
-
- typedef InterruptSetMember ISTProperty[3];
- #define kISTPropertyName "driver-ist"
-
- typedef long InterruptReturnValue;
-
- enum {
- kFirstMemberNumber = 1,
- kIsrIsComplete = 0,
- kIsrIsNotComplete = -1,
- kMemberNumberParent = -2
- };
-
- typedef Boolean InterruptSourceState;
-
- enum {
- kSourceWasEnabled = true,
- kSourceWasDisabled = false
- };
-
- typedef InterruptMemberNumber (*InterruptHandler)(InterruptSetMember ISTmember, void *refCon, UInt32 theIntCount);
- typedef void (*InterruptEnabler)(InterruptSetMember ISTmember, void *refCon);
- typedef InterruptSourceState (*InterruptDisabler)(InterruptSetMember ISTmember, void *refCon);
-
- enum {
- kReturnToParentWhenComplete = 0x00000001,
- kReturnToParentWhenNotComplete = 0x00000002
- };
-
- typedef OptionBits InterruptSetOptions;
- /* Interrupt Services */
- extern OSStatus CreateInterruptSet(InterruptSetID parentSet, InterruptMemberNumber parentMember, InterruptMemberNumber setSize, InterruptSetID *setID, InterruptSetOptions options);
-
- extern OSStatus InstallInterruptFunctions(InterruptSetID setID, InterruptMemberNumber member, void *refCon, InterruptHandler handlerFunction, InterruptEnabler enableFunction, InterruptDisabler disableFunction);
-
- extern OSStatus GetInterruptFunctions(InterruptSetID setID, InterruptMemberNumber member, void **refCon, InterruptHandler *handlerFunction, InterruptEnabler *enableFunction, InterruptDisabler *disableFunction);
-
- extern OSStatus ChangeInterruptSetOptions(InterruptSetID setID, InterruptSetOptions options);
-
- extern OSStatus GetInterruptSetOptions(InterruptSetID setID, InterruptSetOptions *options);
-
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __INTERRUPTS__ */
-
-